package com.tvein.sanguo.controller.Game.system
{
	//flash
	//pureMVC
	import org.puremvc.as3.multicore.interfaces.ICommand;
	import org.puremvc.as3.multicore.interfaces.INotification;
	import org.puremvc.as3.multicore.utilities.fabrication.patterns.command.SimpleFabricationCommand;
	//custom
	import com.tvein.sanguo.common.CommonConstants;
	import com.tvein.sanguo.view.ApplicationMediator;
//
	public class Console extends SimpleFabricationCommand implements ICommand
	{
		private var sanguoMediator:ApplicationMediator;
		
		override public function execute(notification:INotification) : void
		{
			sanguoMediator = facade.retrieveMediator(ApplicationMediator.NAME) as ApplicationMediator;
			
			if (notification.getBody()[1] == 0)
			{
				sanguoMediator.sanguo.setChildIndex(sanguoMediator.sanguo.getChildByName("SystemLog"), sanguoMediator.sanguo.numChildren - 1);
				sanguoMediator.sysLog.textColor = 0xffffff;
			}
			else
			{
				sanguoMediator.sanguo.setChildIndex(sanguoMediator.sanguo.getChildByName("SystemLog"), 0);
				sanguoMediator.sysLog.textColor = 0x000000;
			}
		}
		
		//Custom
	}
}